<template>
  <div class="classify app_content">
    <!-- 导航栏  titelText="详情信息"-->
    <div class="header_body" style="margin: 0">
      <header-nav
          :slefBack="true"
          @goBack="goBack"
      >
        <template #right>
          <div style="color: #3f81c1;font-weight: bold" @click="goItemInfoEdit">新增</div>
        </template>
      </header-nav>
    </div>
    <div class="detail_body" style="width: 100%;height: 100%;overflow-y: auto;">
      <iframe
          class="full-page-iframe"
          :src="itemInfo.deviceCode"

      ></iframe>
    </div>
  </div>
</template>

<script setup name="ManagementScanItemInfo">
const router = useRouter();
const itemInfo = ref({})
onMounted(() => {
  const query = router?.currentRoute?.value?.query;
  itemInfo.value = query
  console.log("扫码信息：", query)
})
/**
 * 详情
 */
function goItemInfoEdit(item) {
  router.push({
    name: "managementScanItemEdit",
    // query: {
    //   itemInfo: JSON.stringify(item)
    // },
  });
}
const goBack = () => {
  router.go(-1);
};
</script>

<style scoped>
.classify {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background-color: #ffff;
}

.full-page-iframe {
  width: 100%;
  height: 100vh;
  border: none; /* 移除边框，如果需要的话 */
}
</style>